package com.cpedia.android.deal;

import android.content.Context;
import com.cpedia.android.deal.model.DealMessage;

/**
 * User: pchen
 * Date: Jun 4, 2009
 */

/**
 * Defines the interface that DealListener will use to callback to requesters. This class
 * is defined as non-abstract so that someone who wants to receive only a few messages can
 * do so without implementing the entire interface. It is highly recommended that users of
 * this interface use the @Override annotation in their implementations to avoid being caught by
 * changes in this class.
 */

public class DealListener {

    public void checkDealStarted(Context context) {
    }

    public void checkDealFinished(Context context) {
    }

    public void checkDealFailed(Context context, String reason) {
    }

    public void synchronizDealListFinished(Account account,int totalDeals, int numNewDeals){
    }

    public void listLocalDealsStarted(Account account){
    }

     public void listLocalDeals(Account account, DealMessage[] dealMessages){
    }

     public void listLocalDealsFinished(Account account){
    }

     public void listLocalDealsFailed(Account account, String reason){
    }

     public void synchronizeDealListStarted(Account account){
    }


    /**
     * General notification messages subclasses can override to be notified that the controller
     * has completed a command. This is useful for turning off progress indicators that may have
     * been left over from previous commands.
     *
     * @param moreCommandsToRun True if the controller will continue on to another command
     *                          immediately.
     */
    public void controllerCommandCompleted(boolean moreCommandsToRun) {

    }

}
